🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / model / src / commonMain / kotlin / org / meshtastic / core / model / service / LockdownState.kt
Displaying Raw • Download
core/model/src/commonMain/kotlin/org/meshtastic/core/model/service/LockdownState.kt bd2863243bab6eb213401d949839a2bc74dde7e2 (bd286324) Text, 2.22 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.model.service
T8b949e/** Represents the lockdown authentication state for a firmware-locked device. */
Tff7b72sealed Tff7b72class T56d364LockdownState Tb4b4b4{
Tff7b72data Tff7b72object T56d364None Tb4b4b4: Te6edf3LockdownStateTb4b4b4(Tb4b4b4)
T8b949e/**
* Device is locked or this client is not yet authorized.
*
* @param lockReason machine-readable reason from firmware (e.g. "needs_auth", "token_missing", "token_expired").
* Empty string when unknown.
*/
Tff7b72data Tff7b72class T56d364LockedTb4b4b4(Tff7b72val Te6edf3lockReasonTb4b4b4: Tffa657String Tff7b72= Ta5d6ff"Ta5d6ff"Tb4b4b4) Tb4b4b4: Te6edf3LockdownStateTb4b4b4(Tb4b4b4)
Tff7b72data Tff7b72object T56d364NeedsProvision Tb4b4b4: Te6edf3LockdownStateTb4b4b4(Tb4b4b4)
Tff7b72data Tff7b72object T56d364Unlocked Tb4b4b4: Te6edf3LockdownStateTb4b4b4(Tb4b4b4)
T8b949e/** Device is lockdown-capable but lockdown is currently OFF. The toggle shows OFF. */
Tff7b72data Tff7b72object T56d364Disabled Tb4b4b4: Te6edf3LockdownStateTb4b4b4(Tb4b4b4)
T8b949e/** Lock Now ACK received — client should disconnect immediately, no dialog. */
Tff7b72data Tff7b72object T56d364LockNowAcknowledged Tb4b4b4: Te6edf3LockdownStateTb4b4b4(Tb4b4b4)
T8b949e/** Wrong passphrase — retry immediately. */
Tff7b72data Tff7b72object T56d364UnlockFailed Tb4b4b4: Te6edf3LockdownStateTb4b4b4(Tb4b4b4)
T8b949e/** Too many attempts — must wait [backoffSeconds] before retrying. */
Tff7b72data Tff7b72class T56d364UnlockBackoffTb4b4b4(Tff7b72val Te6edf3backoffSecondsTb4b4b4: Tffa657IntTb4b4b4) Tb4b4b4: Te6edf3LockdownStateTb4b4b4(Tb4b4b4) Tb4b4b4{
Tff7b72init Tb4b4b4{
Te6edf3requireTb4b4b4(Te6edf3backoffSeconds Tff7b72> T79c0ff0Tb4b4b4) Tb4b4b4{ Ta5d6ff"Ta5d6ffbackoffSeconds must be positiveTa5d6ff" Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
T8b949e/**
* Lockdown session token metadata from a successful unlock.
*
* @param bootsRemaining Number of reboots before the token expires.
* @param expiryEpoch Unix epoch seconds; 0 means no time-based expiry.
*/
Tff7b72data Tff7b72class T56d364LockdownTokenInfoTb4b4b4(Tff7b72val Te6edf3bootsRemainingTb4b4b4: Tffa657IntTb4b4b4, Tff7b72val Te6edf3expiryEpochTb4b4b4: Tffa657LongTb4b4b4)
Served by rngit 1.5.0 - Generated in 0.05s